class YoutubeData < ActiveRecord::Base
  belongs_to :youtube_crawl, :foreign_key => :crawl_id # foreign key - crawl_id
  
  def crawl
    youtube_crawl
  end
  
  def crawl=(new_crawl)
    youtube_crawl=new_crawl
  end
  
  @@trusts = {
  "age" => 0.75,
  "books" => 0.8,
  "first_name" => 0.9,
  "full_hometown" => 0.75,
  "full_location" => 0.75,
  "gender" => 0.9,
  "interests" => 0.8,
  "last_name" => 0.9,
  "locale_country" => 0.8,
  "locality" => 0.8,
  "movies" => 0.8,
  "music" => 0.8,
  "occupation" => 0.8
  }
  
  def trust_of(field)
    raise Exception.new "#{self.class} must define trust for #{field}" if !@@trusts.key? field
    @@trusts[field]
  end
end
